<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Register extends CI_Controller {

	public function index($start = 0){
	   $this->load->model('Registerfastival', null, true);
       
       $this->load->library('pagination');
       $cofigPagination = $this->config->item('pagination');
       
        $config['base_url'] = base_url().'register/index';
        $config['total_rows'] = $this->Registerfastival->getCount();
        $config['per_page'] = $cofigPagination['number_row']; 
        $this->pagination->initialize($config); 

       $data['registerfastival'] = $this->Registerfastival->getList($start, $cofigPagination['number_row']);
	   $this->load->view('register/index', $data);
	}
    
    /**
     * Delete customer
     * @author phuc.duong
     */
    public function delete($RegisterfastivalId){
         $this->load->model('Registerfastival', null, true);
         if($this->Registerfastival->delete($RegisterfastivalId)){
            redirect(base_url().'register.html');
         }
    }
    
    /**
     * edit save config id
     * @author phuc.duong
     */
    public function view($RegisterfastivalId){
        $res = false;
        $this->load->model('Registerfastival', null, true);
        
        $data['Register'] = $this->Registerfastival->getRegister($RegisterfastivalId);
        $this->load->view('register/view', $data);       
    }
    
}

/* End of file welcome.php */
/* Location: ./application/controllers/welcome.php */